package com.are.odisea;

import java.sql.ResultSet;
import java.sql.SQLException;

public class ManejadorRoles {
	private db conexion = null;
	private Roles rol;
	public db getConexion() {
		return conexion;
	}
	public void setConexion(db conexion) {
		this.conexion = conexion;
	}
	public Roles getRol() {
		return rol;
	}
	public void setRol(Roles rol) {
		this.rol = rol;
	}
	public ManejadorRoles(db conexion) {
		super();
		this.setConexion(conexion);
		this.setRol(new Roles());
	}
	public ResultSet  GetRoles(){
		ResultSet rs=null;
		String sql="select id, descripcion from Roles order by id";
		try {
			rs=conexion.Query(sql);
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return rs;
	}
	
}
